package com.yuanchu.search.client;

import com.yuanchu.search.dto.OrderDetailDto;
import com.yuanchu.search.entity.YoshopOrderRefundEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-01-24 10:20
 */
@FeignClient(value = "yuanchu-order", fallbackFactory = FeignOrderServiceClientFallbackFactory.class)
public interface FeignOrderClient {

    /**
     * 查询商家订单详情
     * @param orderId
     * @return
     */
    @GetMapping("/order/store/detail")
    OrderDetailDto queryStoreOrderDetail(@RequestParam("orderId") Integer orderId);

    /**
     * 查询用户订单详情
     * @param orderId
     * @return
     */
    @GetMapping("/order/detail")
    OrderDetailDto getOrderDetail(@RequestParam("orderId") Integer orderId);

    /**
     *  查询商家售后订单详情
     * @param orderRefundId
     * @return
     */
    @GetMapping("/order/refund/detail")
    YoshopOrderRefundEntity queryOrderRefundDetail(@RequestParam("orderRefundId") Integer orderRefundId);
}
